home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / ODUtils / Unused / SemtIntf.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-16  |  11.8 KB  |  338 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  *  This file was generated by the SOM Compiler.
  4.  *  Generated using:
  5.  *     SOM incremental update: somc/smmain.c
  6.  */
  7.  
  8. /*
  9.     File:        SemtIntf.cpp
  10.  
  11.     Contains:    Implementation of Mac specific ODCPlusSemanticInterface class.
  12.  
  13.     Owned by:    Nick Pilch
  14.  
  15.     Copyright:    © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
  16. */
  17.  
  18.  
  19. #ifndef _EXCEPT_
  20. #include "Except.h"
  21. #endif
  22.  
  23. #define VARIABLE_MACROS
  24. #define ODCPlusSemanticInterface_Class_Source
  25. #include <SemtIntf.xih>
  26.  
  27. //------------------------------------------------------------------------------
  28. // ODCPlusSemanticInterface::somInit
  29. //------------------------------------------------------------------------------
  30.  
  31. SOM_Scope void  SOMLINK ODCPlusSemanticInterfacesomInit(ODCPlusSemanticInterface *somSelf)
  32. {
  33.     // ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  34.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfacesomInit");
  35.  
  36.     ODCPlusSemanticInterface_parents_somInit(somSelf);
  37.  
  38.     /* _fHelper = kODNULL; */ // som initializes fields to NULL.
  39. }
  40.  
  41. //------------------------------------------------------------------------------
  42. // ODCPlusSemanticInterface::InitCPlusSemanticInterface
  43. //------------------------------------------------------------------------------
  44.  
  45. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceInitCPlusSemanticInterface(ODCPlusSemanticInterface *somSelf, Environment *ev,
  46.         ODPart* base,
  47.         SIHelperAbs* helper,
  48.         ODSession* session)
  49. {
  50.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  51.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceInitCPlusSemanticInterface");
  52.     
  53.     somSelf->InitSemanticInterface(ev, base, session);
  54.     
  55.     _fHelper = helper;
  56. }
  57.  
  58. //------------------------------------------------------------------------------
  59. // ODCPlusSemanticInterface::somUninit
  60. //------------------------------------------------------------------------------
  61.  
  62. SOM_Scope void  SOMLINK ODCPlusSemanticInterfacesomUninit(ODCPlusSemanticInterface *somSelf)
  63. {
  64.     // ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  65.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfacesomUninit");
  66.  
  67.     ODCPlusSemanticInterface_parents_somUninit(somSelf);
  68. }
  69.  
  70. //------------------------------------------------------------------------------
  71. // ODCPlusSemanticInterface::GetSIHelper
  72. //------------------------------------------------------------------------------
  73.  
  74. SOM_Scope SIHelperAbs*  SOMLINK ODCPlusSemanticInterfaceGetSIHelper(ODCPlusSemanticInterface *somSelf, Environment *ev)
  75. {
  76.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  77.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceGetSIHelper");
  78.  
  79.     return _fHelper;
  80. }
  81.  
  82. //------------------------------------------------------------------------------
  83. // ODCPlusSemanticInterface::CallEventHandler
  84. //------------------------------------------------------------------------------
  85.  
  86. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceCallEventHandler(ODCPlusSemanticInterface *somSelf, Environment *ev,
  87.         ODPart* thePart,
  88.         ODAppleEvent* theODAppleEvent,
  89.         ODAppleEvent* reply)
  90. {
  91.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  92.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceCallEventHandler");
  93.  
  94.     OSErr error;
  95.     SOM_TRY
  96.         somSelf->CheckValid(ev);
  97.         error = _fHelper->CallEventHandler((ODPart*)somSelf->GetBase(ev),
  98.                                                 theODAppleEvent, reply);
  99.         THROW_IF_ERROR(error);
  100.     SOM_CATCH_ALL
  101.     SOM_ENDTRY
  102. }
  103.  
  104. //------------------------------------------------------------------------------
  105. // ODCPlusSemanticInterface::CallCoercionHandler
  106. //------------------------------------------------------------------------------
  107.  
  108. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceCallCoercionHandler(ODCPlusSemanticInterface *somSelf, Environment *ev,
  109.         ODPart* thePart,
  110.         ODDesc* theODDesc,
  111.         ODDescType toType,
  112.         ODDesc* result)
  113. {
  114.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  115.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceCallCoercionHandler");
  116.  
  117.     OSErr error;
  118.     SOM_TRY
  119.         somSelf->CheckValid(ev);
  120.         error = _fHelper->CallCoercionHandler((ODPart*)somSelf->GetBase(ev),
  121.                                                 theODDesc, toType, result);
  122.         THROW_IF_ERROR(error);
  123.     SOM_CATCH_ALL
  124.     SOM_ENDTRY
  125. }
  126.  
  127. //------------------------------------------------------------------------------
  128. // ODCPlusSemanticInterface::CallObjectAccessor
  129. //------------------------------------------------------------------------------
  130.  
  131. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceCallObjectAccessor(ODCPlusSemanticInterface *somSelf, Environment *ev,
  132.         ODPart* thePart,
  133.         ODDescType desiredClass,
  134.         ODOSLToken* container,
  135.         ODDescType containerClass,
  136.         ODDescType form,
  137.         ODDesc* selectionData,
  138.         ODOSLToken* value)
  139. {
  140.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  141.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceCallObjectAccessor");
  142.  
  143.     OSErr error;
  144.     SOM_TRY
  145.         somSelf->CheckValid(ev);
  146.         error = _fHelper->CallObjectAccessor((ODPart*)somSelf->GetBase(ev),
  147.                                                 desiredClass, container,
  148.                                                 containerClass, form,
  149.                                                 selectionData, value);
  150.         THROW_IF_ERROR(error);
  151.     SOM_CATCH_ALL
  152.     SOM_ENDTRY
  153. }
  154.  
  155. //------------------------------------------------------------------------------
  156. // ODCPlusSemanticInterface::CallPredispatchProc
  157. //------------------------------------------------------------------------------
  158.  
  159. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceCallPredispatchProc(ODCPlusSemanticInterface *somSelf, Environment *ev,
  160.         ODPart* thePart,
  161.         ODAppleEvent* theODAppleEvent,
  162.         ODAppleEvent* reply)
  163. {
  164.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  165.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceCallPredispatchProc");
  166.  
  167.     OSErr error;
  168.     SOM_TRY
  169.         somSelf->CheckValid(ev);
  170.         error = _fHelper->CallPredispatchProc((ODPart*)somSelf->GetBase(ev),
  171.                                                 theODAppleEvent, reply);
  172.         THROW_IF_ERROR(error);
  173.     SOM_CATCH_ALL
  174.     SOM_ENDTRY
  175. }
  176.  
  177. //------------------------------------------------------------------------------
  178. // ODCPlusSemanticInterface::CallCompareProc
  179. //------------------------------------------------------------------------------
  180.  
  181. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceCallCompareProc(ODCPlusSemanticInterface *somSelf, Environment *ev,
  182.         ODPart* thePart,
  183.         ODDescType oper,
  184.         ODOSLToken* obj1,
  185.         ODOSLToken* obj2,
  186.         ODBoolean* result)
  187. {
  188.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  189.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceCallCompareProc");
  190.  
  191.     OSErr error;
  192.     SOM_TRY
  193.         somSelf->CheckValid(ev);
  194.         error = _fHelper->CallCompareProc((ODPart*)somSelf->GetBase(ev), oper,
  195.                                                 obj1, obj2, result);
  196.         THROW_IF_ERROR(error);
  197.     SOM_CATCH_ALL
  198.     SOM_ENDTRY
  199. }
  200.  
  201. //------------------------------------------------------------------------------
  202. // ODCPlusSemanticInterface::CallCountProc
  203. //------------------------------------------------------------------------------
  204.  
  205. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceCallCountProc(ODCPlusSemanticInterface *somSelf, Environment *ev,
  206.         ODPart* thePart,
  207.         ODDescType desiredType,
  208.         ODDescType containerClass,
  209.         ODOSLToken* container,
  210.         ODSLong* result)
  211. {
  212.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  213.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceCallCountProc");
  214.  
  215.     OSErr error;
  216.     SOM_TRY
  217.         somSelf->CheckValid(ev);
  218.         error = _fHelper->CallCountProc((ODPart*)somSelf->GetBase(ev),
  219.                                             desiredType, containerClass,
  220.                                             container, result);
  221.         THROW_IF_ERROR(error);
  222.     SOM_CATCH_ALL
  223.     SOM_ENDTRY
  224. }
  225.  
  226. //------------------------------------------------------------------------------
  227. // ODCPlusSemanticInterface::CallDisposeTokenProc
  228. //------------------------------------------------------------------------------
  229.  
  230. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceCallDisposeTokenProc(ODCPlusSemanticInterface *somSelf, Environment *ev,
  231.         ODPart* thePart,
  232.         ODOSLToken* unneededToken)
  233. {
  234.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  235.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceCallDisposeTokenProc");
  236.  
  237.     OSErr error;
  238.     SOM_TRY
  239.         somSelf->CheckValid(ev);
  240.         error = _fHelper->CallDisposeTokenProc((ODPart*)somSelf->GetBase(ev),
  241.                                                     unneededToken);
  242.         THROW_IF_ERROR(error);
  243.     SOM_CATCH_ALL
  244.     SOM_ENDTRY
  245. }
  246.  
  247. //------------------------------------------------------------------------------
  248. // ODCPlusSemanticInterface::CallGetErrDescProc
  249. //------------------------------------------------------------------------------
  250.  
  251. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceCallGetErrDescProc(ODCPlusSemanticInterface *somSelf, Environment *ev,
  252.         ODPart* thePart,
  253.         ODDesc** errDesc)
  254. {
  255.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  256.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceCallGetErrDescProc");
  257.  
  258.     OSErr error;
  259.     SOM_TRY
  260.         somSelf->CheckValid(ev);
  261.         error = _fHelper->CallGetErrDescProc((ODPart*)somSelf->GetBase(ev),
  262.                                                 errDesc);
  263.         THROW_IF_ERROR(error);
  264.     SOM_CATCH_ALL
  265.     SOM_ENDTRY
  266. }
  267.  
  268. //------------------------------------------------------------------------------
  269. // ODCPlusSemanticInterface::CallGetMarkTokenProc
  270. //------------------------------------------------------------------------------
  271.  
  272. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceCallGetMarkTokenProc(ODCPlusSemanticInterface *somSelf, Environment *ev,
  273.         ODPart* thePart,
  274.         ODOSLToken* dContainerToken,
  275.         ODDescType containerClass,
  276.         ODOSLToken* result)
  277. {
  278.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  279.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceCallGetMarkTokenProc");
  280.  
  281.     OSErr error;
  282.     SOM_TRY
  283.         somSelf->CheckValid(ev);
  284.         error = _fHelper->CallGetMarkTokenProc((ODPart*)somSelf->GetBase(ev),
  285.                                                     dContainerToken,
  286.                                                     containerClass, result);
  287.         THROW_IF_ERROR(error);
  288.     SOM_CATCH_ALL
  289.     SOM_ENDTRY
  290. }
  291.  
  292. //------------------------------------------------------------------------------
  293. // ODCPlusSemanticInterface::CallMarkProc
  294. //------------------------------------------------------------------------------
  295.  
  296. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceCallMarkProc(ODCPlusSemanticInterface *somSelf, Environment *ev,
  297.         ODPart* thePart,
  298.         ODOSLToken* dToken,
  299.         ODOSLToken* markToken,
  300.         ODSLong index)
  301. {
  302.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  303.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceCallMarkProc");
  304.  
  305.     OSErr error;
  306.     SOM_TRY
  307.         somSelf->CheckValid(ev);
  308.         error = _fHelper->CallMarkProc((ODPart*)somSelf->GetBase(ev), dToken,
  309.                                             markToken, index);
  310.         THROW_IF_ERROR(error);
  311.     SOM_CATCH_ALL
  312.     SOM_ENDTRY
  313. }
  314.  
  315. //------------------------------------------------------------------------------
  316. // ODCPlusSemanticInterface::CallAdjustMarksProc
  317. //------------------------------------------------------------------------------
  318.  
  319. SOM_Scope void  SOMLINK ODCPlusSemanticInterfaceCallAdjustMarksProc(ODCPlusSemanticInterface *somSelf, Environment *ev,
  320.         ODPart* thePart,
  321.         ODSLong newStart,
  322.         ODSLong newStop,
  323.         ODOSLToken* markToken)
  324. {
  325.     ODCPlusSemanticInterfaceData *somThis = ODCPlusSemanticInterfaceGetData(somSelf);
  326.     ODCPlusSemanticInterfaceMethodDebug("ODCPlusSemanticInterface","ODCPlusSemanticInterfaceCallAdjustMarksProc");
  327.  
  328.     OSErr error;
  329.     SOM_TRY
  330.         somSelf->CheckValid(ev);
  331.         error = _fHelper->CallAdjustMarksProc((ODPart*)somSelf->GetBase(ev),
  332.                                                 newStart, newStop, markToken);
  333.         THROW_IF_ERROR(error);
  334.     SOM_CATCH_ALL
  335.     SOM_ENDTRY
  336. }
  337.  
  338.